<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.global.js"></script>
</head>
<body>
    <div id="app">
        <ul>
            <!-- todos有几个元素 就渲染几个li -->
            <!-- 给元素起一个随意的名字例如item -->
            <li v-for="item in todos">
                {{item.text}}
            </li>
        </ul>
    </div>
    <script>
        Vue.createApp({
            data() {
                return {
                    todos: [
                        { text: 'Learn JavaScript' },
                        { text: 'Learn Vue' },
                        { text: 'Build something awesome' }
                    ]
                }
            }
        }).mount("#app")
    </script>
</body>
</html>